home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
system
/
dirco501.zip
/
DIRCOMP.DOC
< prev
next >
Wrap
Text File
|
1995-01-02
|
8KB
|
166 lines
DIRCOMP.DOC
01/02/95
DIRCOMP compares two complete subdirectories and looks for dissimilarities
between files (different sizes or creation dates as well as missing files). It
produces a disk report called (by default) C:\DIRCOMP.TXT showing the
dissimilarities. In some ways, this is similar to a separate utility called
FILUPDAT but DIRCOMP adds a couple of features:
* It can resolve the dissimilarities for you. When you call the
routine, you provide a primary subdirectory and a secondary subdirectory.
If files in the primary subdirectory are more recent than those in the
secondary subdirectory, DIRCOMP can copy the files for you (similar to the
DOS REPLACE command with the /U option).
* In addition, if files exist in the secondary subdirectory that aren't in
the primary, DIRCOMP can kill the files in the secondary subdirectory for
you.
* Can produce a status file showing what was compared, resolved, etc.
* DIRCOMP can also go through child subdirectories for you and do this
effort throughout.
* DIRCOMP can move the files instead of copy them, effectively allowing you
to prune and graft directory structures.
To reduce the risks inherent in this sort of automatic execution, neither
/UPDATE or /KILL are available if the secondary subdirectory is a network drive
unless the "/NET" option is passed in.
DIRCOMP is typically used in the process of backing up files from one drive to
another. DIRCOMP allows you to easily copy every file and get rid of now
non-existant files.
Note that DOS includes a command called REPLACE which will do some of the same
things that this utility does. The central differences are that REPLACE won't
delete mismatched files and it doesn't produce a report on inconsistencies.
REPLACE also doesn't have the ability to handle odd attributes or deal with
cascading subdirectories. REPLACE *is* a lot quicker though.
Syntax:
DIRCOMP directory1 directory2 [ /S ] [ /CREATE ]
[ /UPDATE ] [ /KILL ] [ /CLONE ] [ /MOVE ] [ /ATTR=[H][S][R] ] [ /NET ]
[ /Frptfile | /-F ] [ /OVERWRITE | /APPEND | /-OVERWRITE | /OVERASK ]
[ /ALL ] [ /Td: | /Td:\path ] [ /Q ] [ /? ]
where:
"directory1" is the name of the primary (source) subdirectory. If /UPDATE or
/KILL are used, the secondary subdirectory's contents will be changed to reflect
the ones here.
"directory2" is the name of the secondary subdirectory which will have files
copied to it or deleted from it.
"/S" goes through and processes subdirectories off of the subdirectories you
specified in a cascading manner. You can use this option to copy entire
directory trees if you want. Still requires /UPDATE and/or /KILL if you want it
to actually do anything besides report on conditions of course. The program may
not be smart enough to delete all embedded subdirectories.
"/CREATE" will create directory2 if it doesn't exist already.
"/UPDATE" says to copy any files from directory1 to directory2 which are either
(a) newer in directory1 or (b) not in directory2 at all. Files will *NOT* be
copied if (a) the directory2 files are more recent or (b) file sizes are the
only difference.
"/KILL" says to delete any files in directory2 which are not in directory1.
/KILL automatically invokes /UPDATE.
"/CLONE" says to copy all files from directory1 to directory2 even if if the
files in directory2 are more recent than those in directory1. /CLONE
automatically invokes /UPDATE.
"/MOVE" says to move the files instead of copying them. This deletes from
directory1 any file that was copied to directory2. (The deletion is done only
if the initial copy succeeded.) Typically, the option is used in combination
with the /CLONE option.
"/ATTR=[H][S][R]" allows you to specify a combination of attributes that you
want considered. Normally, hidden, system, and read-only files are ignored by
the routine. Using /ATTR, you can include whatever you want. /ATTR=HSR, for
example, gets them all.
"/NET" removes a restriction which does not allow the secondary directory to be
a network drive. Note that the test the program performs for this is somewhat
imperfect and it may not notice that it's actually a networked drive. Sorry!
"/Frptfile" provides the name of the report file to create. "/FC:\DIRCOMP.TXT"
is the default. Specifying "/FSCRN:" will send the report to the screen.
"/-F" stops the creation of the report file.
"/OVERWRITE" says to overwrite the report file if it's already there.
"/APPEND" says to append to the end of any existing report file.
"/-OVERWRITE" says to abort if the output file exists already.
"/OVERASK" says to prompt if the output file exists already. This is the
default.
"/ALL" says to write all files to the report file (typically C:\DIRCOMP.TXT),
not just the ones that have differences.
"/Td:" specifies the drive to write any temporary ISAM files that the routine
needs. ISAM data bases are used to store and sort the file names. ISAM files
cannot be created reliably on certain types of drives. If a /Td: specification
(e.g. "/TC:") is not specified, the routine checks each of the following drive
specifications in order:
- the drive where the report is being written to (using the /Frptfile spec if
present)
- the default drive
- drive C
In each case, the program tries to skip the drive if it's either removeable or
a remote (network) drive. The latter test is often incorrect. After that, it
tries to create a file on the drive; CD-ROM drives always fail that test.
"/Td:\path" is similar to "/Td:" but it allows you to fully specify the path for
the temporary output files. If you don't specify a "/T" parameter at all or if
you use "/Td:", the files will always be written to the root directory.
"/Q" turns off the file-by-file status messages.
"/?" or "/HELP" or "HELP" gives you syntactical help for the command.
Samples: DIRCOMP J:\EBBNEW\DATA E:\EBBNEW\DATA /KILL /FC:\DATA.EBB
DIRCOMP E:\EBBNEW\DATA J:\EBBNEW\DATA /UPDATE /KILL /NET
DIRCOMP C:\TC D:\TEMP /UPDATE /KILL /ATTR=RHS /S
NOTE ON DISK SPACE: By default, DIRCOMP builds ISAM files with intermediate
results on your C drive. If you specify an /Frptfile parameter and include a
drive specification, it will typically create the ISAM files there instead. You
can also specify the ISAM location using the /Td: parameter.
Writer:
This program was written by Bruce Guthrie of Wayne Software. It is free for use
and redistribution provided relevant documentation is kept with the program, no
changes are made to the program or documentation, and it is not bundled with
commercial programs or charged for separately. People who need to bundle it in
for-sale packages must pay a $50 registration fee to "Wayne Software" at the
following address.
Additional information about this and other Wayne Software programs can be found
in the file BRUCEymm.DOC which should be included in the original ZIP file.
("ymm" is replaced by the last digit of the year and the two digit month of the
release. BRUCE312.DOC came out in December 1993. This same naming convention
is used in naming the ZIP file that this program was included in.) Comments and
suggestions can also be sent to:
Bruce Guthrie
Wayne Software
113 Sheffield St.
Silver Spring, MD 20910
fax: (301) 588-8986
See BRUCEymm.DOC file for additional contact information.
Foreign users: Please provide an Internet e-mail address in all correspondence.